package com.lebang.model;


import com.lebangweb.common.TextUtil;
import lombok.Data;

/**
 * @Author: hwq
 * @Date: 2019/8/20 10:43
 * @Version 1.0
 */
@Data
public class MsgRequest {
    private Integer type;
    private String starTime;
    private String endTime;
    private int starMoney;
    private int endMoney;
    private String taskId;
    private String category;
    private String brand;
    private String phone;
    private String title;
    private String msg;

    public boolean filter() {
        boolean status = false;
        switch (this.type) {
            case 1:
                if (!TextUtil.isEmpty(starTime, endTime)) {
                    status = true;
                }
                break;
            case 2:
                if (!TextUtil.isEmpty(starMoney, endMoney)) {
                    status = true;
                }
                break;
            case 3:
                if (!TextUtil.isEmpty(phone)) {
                    status = true;
                }
                break;
            case 4:
                if (!TextUtil.isEmpty(brand)) {
                    status = true;
                }
                break;
            case 5:
                if (!TextUtil.isEmpty(taskId)) {
                    status = true;
                }
                break;
            default:
                break;

        }
        return status;
    }
}
